package com.sulent.frame.web.controller.test.vo;

import lombok.Data;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

@ToString
@Data
public class UserVo {

    @NotBlank(message = "id不能为空",groups = UserGroup.UpdateGroup.class)
    private String id;

    @NotBlank(message = "用户名不能为空",groups = 
            {UserGroup.CreateGroup.class,UserGroup.UpdateGroup.class})
    private String userName;

    @NotBlank(message = "姓名不能为空",groups = 
            {UserGroup.CreateGroup.class,UserGroup.UpdateGroup.class})
    private String name;

    @Size(min=11,max=11,message = "手机号长度不符合要求",groups =
            {UserGroup.CreateGroup.class,UserGroup.UpdateGroup.class})
    private String phone;

    @NotNull(message = "性别不能为空",groups =
            {UserGroup.CreateGroup.class,UserGroup.UpdateGroup.class})
    private Integer sex;
}